<%--
  Created by IntelliJ IDEA.
  User: cm
  Date: 2018/2/4
  Time: 下午5:39
  To change this template use File | Settings | File Templates.
--%>
<%@ page import="fm.cache.ConfigCache" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<script type="text/html" id="dataTmpl">
    <tr data-id="\${id}">
        <td>
            <p>\${main_title}</p>
        </td>
        <td>
            <p>\${sub_title}</p>
        </td>
        <td>
            <img src="\${portal_img}"/>
        </td>
        <td>
            <p>
                \${formatDate(create_time)}
            </p>
        </td>
        <shiro:hasRole name="all">
        <td>
            <p>
                \${user_nickname}
            </p>
        </td>
        </shiro:hasRole>
        <td>
            \${sectionName}
        </td>
        <td>
            {{if ad_option}}
            <p>
                {{if ad_option&&ad_option.LIST_TOP}}
                <font color='#20b2aa'>已置顶</font>
                {{else}}
                <font color='#orange'>未置顶</font>
                {{/if}}
            </p>

            <p>
                {{if ad_option&&ad_option.BANNER}}
                <font color='#20b2aa'>已推广至版块顶部</font>
                {{else}}
                <font color='#orange'>未推广</font>
                {{/if}}
            </p>

            {{else}}
            <p><font>无任何推广</font></p>
            {{/if}}
        </td>
        <td>
            <div>

                <div style="min-width:16rem;">
                    {{if ad_option}}
                    {{if ad_option&&ad_option.LIST_TOP}}
                    <a href="javascript:untopArticle('\${id}','LIST_TOP');" class="btn btn-warning">取消置顶</a>
                    {{else}}
                    <a href="javascript:topArticle('\${id}','LIST_TOP');" class="btn btn-success">置顶</a>
                    {{/if}}

                    {{if ad_option&&ad_option.BANNER}}
                    <a href="javascript:untopArticle('\${id}','BANNER');" class="btn btn-warning">取消版块推广</a>
                    {{else}}
                    <a href="javascript:topArticle('\${id}','BANNER');" class="btn btn-success">版块推广</a>
                    {{/if}}
                    {{else}}
                    <a href="javascript:topArticle('\${id}','BANNER');" class="btn btn-success">版块推广</a>
                    <a href="javascript:topArticle('\${id}','LIST_TOP');" class="btn btn-success">置顶</a>
                    {{/if}}
                    <a href="javascript:editArticle('\${id}');" class="btn btn-warning">修改</a>
                    <a href="javascript:delArticle('\${id}');" class="btn btn-danger">删除</a>
                </div>

            </div>
        </td>
    </tr>
</script>
<script type="text/html" id="payTmpl">
    <div class="pay-qrcode-box">
        {{if codeUrl}}
        <div class="code-box">
            <div id="qrcodePreview" data-src="\${codeUrl}" style="width: 14rem;height: 14rem;">
            </div>
            <p>¥<span>\${total}</span>元</p>
        </div>
        <div class="tip-content">
            <h3>支付提示：</h3>
            <ul>
                <li>扫码支付后请点击"确定"</li>
                <li>支付后文章如果没有更新状态，可能是服务器有延时，请稍后在刷新查看。</li>
            </ul>
        </div>
        {{/if}}
    </div>
</script>